@model IEnumerable<Vms.Web.Models.PROGRAM>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create", new { }, new { @class = "btn" })
</p>
<table class="table table-bordered table-striped">
    <tr>
        <th></th>
        <th>
            Name
        </th>
        <th>
            PlayLength
        </th>
        <th>
            StartYear
        </th>
        <th>
            StartMonth
        </th>
        <th>
            StartDay
        </th>
        <th>
            EndYear
        </th>
        <th>
            EndMonth
        </th>
        <th>
            EndDay
        </th>
        <th>
            MonPlay
        </th>
        <th>
            TuePlay
        </th>
        <th>
            WedPlay
        </th>
        <th>
            ThuPlay
        </th>
        <th>
            FriPlay
        </th>
        <th>
            SatPlay
        </th>
        <th>
            SunPlay
        </th>
        <th>
            StartHour
        </th>
        <th>
            StartMinute
        </th>
        <th>
            EndHour
        </th>
        <th>
            EndMinute
        </th>
        <th>
            CONTENTS
        </th>
        <th>
            SCREEN
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
        <td>
			@item.Name
        </td>
        <td>
			@item.PlayLength
        </td>
        <td>
			@item.StartYear
        </td>
        <td>
			@item.StartMonth
        </td>
        <td>
			@item.StartDay
        </td>
        <td>
			@item.EndYear
        </td>
        <td>
			@item.EndMonth
        </td>
        <td>
			@item.EndDay
        </td>
        <td>
			@item.MonPlay
        </td>
        <td>
			@item.TuePlay
        </td>
        <td>
			@item.WedPlay
        </td>
        <td>
			@item.ThuPlay
        </td>
        <td>
			@item.FriPlay
        </td>
        <td>
			@item.SatPlay
        </td>
        <td>
			@item.SunPlay
        </td>
        <td>
			@item.StartHour
        </td>
        <td>
			@item.StartMinute
        </td>
        <td>
			@item.EndHour
        </td>
        <td>
			@item.EndMinute
        </td>
        <td>
			@(item.CONTENTS == null ? "None" : item.CONTENTS.Count.ToString())
        </td>
        <td>
			@(item.SCREEN == null ? "None" : item.SCREEN.Name)
        </td>
    </tr>
}

</table>


